package base

import (
	ffmpeg "gitee.com/general252/goffmpeg/golay"
)

const libraryName = `goffmpeg.dll`

var (
	cli ffmpeg.FFmpegServiceClient
)

func GetClient() ffmpeg.FFmpegServiceClient {
	return cli
}

func init() {
	conn := ffmpeg.NewFFmpegServiceLibrary(libraryName)
	if err := conn.Load(); err != nil {
		panic(err)
	}

	cli = ffmpeg.NewFFmpegServiceClient(conn.NewCC())
}
